<template>
  <div id="app">
    <!-- <HomeView></HomeView> -->
     <!-- <LiuYan></LiuYan> -->
      <!-- <XinJian></XinJian> -->
       <!-- <ChaCao>
           <ul slot="xinwen" slot-scope="{age}">
            <li>腾讯新闻{{ age }}</li>
            <li>网易新闻</li>
            <li>百度新闻</li>
          </ul>
          <ul slot="game">
            <li>王者荣耀</li>
            <li>金铲铲</li>
            <li>三角洲</li>
          </ul>
       </ChaCao> -->
       <span @click="name='OneCom'">内容1</span><span @click="name='TwoCom'">内容2</span>
    <keep-alive>
        <component :is="name"></component>
    </keep-alive>
  </div>
</template>
<script>
import OneCom from './components/OneCom.vue';
import TwoCom from './components/TwoCom.vue';

  // import HomeView from '@/views/HomeView.vue'   
  //  import LiuYan from '@/views/LiuYan.vue'
  //  import XinJian from '@/views/XinJian.vue'    
  // import ChaCao from '@/components/ChaCao.vue'
  export default {
    
    components: {
      // HomeView
      // LiuYan
      // XinJian
      // ChaCao
      OneCom,
      TwoCom
    },
    data(){
      return{
        name:OneCom
      }
    }
  }
</script>
<style lang="less">

</style>
